<include file="Public:header" />
<div class="page-member subpage">
    <div class="form-header">
        <div>
            <div class="line1">
                <div class="fl"><h3>保障退出申请 / 新增</h3></div>
                <div class="fr hidden">
                    <form class="search-form" method="post" action="">
                        <input name="field" value="{$filter.field}" type="text" />
                        <input name="value" value="{$filter.value}" type="text" />
                        <input name="page" value="{$filter.page}" type="hidden" />
                        <input name="order_field" value="{$filter.order_field}" type="hidden" />
                        <input name="order_sort" value="{$filter.order_sort}" type="hidden" />
                        <button class="btn-normal" type="submit">查 询</button>
                    </form>
                </div>
            </div>
            <div class="line2">
                <div class="fl form-btn-group">
                    <in name="$x|default='02-03-12'" value="$rightsCode">
                        <button onclick="submitForm('add');" class="btn-save btn-highlight">保 存</button>
                        <else />
                        <button disabled="disabled" class="btn-save btn-disable">保 存</button>
                    </in>
                    <span>或</span>
                    <a class="linkBtn btn-abort" href="/admin/quit/index">放弃</a>
                </div>
            </div>
        </div>
    </div>
    <div class="form-box2">
        <div>
            <form id="quitForm" method="post" action="">
                <input type="hidden" name="id" id="id" value="{$quit.id}" />
                <input type="hidden" name="yw_no" value="{$quit.yw_no}" />
                <input type="hidden" name="contact_no" value="{$quit.contact_no}" />
                <table class="form">
                    <tr>
                        <th width="15%">房源编号<span class="hint">*</span></th>
                        <td width="35%"><input name="house_no" type="text" value="{$quit.house_no}" /> </td>
                        <th width="15%">房源地址<span class="hint">*</span></th>
                        <td><input placeholder="房源地址根据房源编号自动匹配" name="house_addr" readonly="readonly" type="text" value="{$quit.house_addr}" /> </td>
                    </tr>
                    <tr>
                        <th>姓名<span class="hint">*</span></th>
                        <td><input name="name" type="text" value="{$quit.name}" /> </td>
                        <th>身份证<span class="hint">*</span></th>
                        <td><input type="text" name="idno" value="{$quit.idno}" /></td>
                    </tr>
                    <tr>
                        <th>退出原因<span class="hint">*</span></th>
                        <td><input type="text" name="reason" value="{$quit.reason}" /></td>
                        <th>联系电话<span class="hint">*</span></th>
                        <td><input type="text" name="phone" value="{$quit.phone}" /></td>
                    </tr>
                    <tr>
                        <th>备注</th>
                        <td><input type="text" name="remarks" value="{$quit.remarks}" /></td>
                    </tr>
                </table>
            </form>
        </div>
    </div>
</div>
<link type="text/css" href="__JS__/autocomplete2/src/jquery.autocomplete.min.css" rel="stylesheet">
<script src="__JS__/autocomplete2/src/jquery.autocomplete.js" type="text/javascript"></script>
<script>
    $('input[name=house_no]').autocomplete({
        serviceUrl: '/admin/quit/ajax_SearchHouseByName',
        extraParams: {house:$.trim($("input[name=house_no]").val())},//动态参数值
        paramName: "house",//自定义的参数名 必须和extraParams 参数名相同
        onSelect: function (suggestion) {
            $("input[name=name]").val(suggestion.data.zhname);
            $("input[name=idno]").val(suggestion.data.zhidno);
            $("input[name=phone]").val(suggestion.data.phone);
            $("input[name=house_addr]").val(suggestion.data.addr);
            $("input[name=yw_no]").val(suggestion.data.yw_no);
            $("input[name=contact_no]").val(suggestion.data.contact_no);
        }
    });
</script>
<script src="__JS__/quit.js" type="text/javascript" ></script>
<include file="Public:footer" />
